//
//  OrderHalfButton.m
//  B2C
//
//  Created by 李小龙 on 2017/8/15.
//  Copyright © 2017年 lixiaolong. All rights reserved.
//

#import "OrderHalfButton.h"

@implementation OrderHalfButton

+ (instancetype)orderButtonWithType:(OrderButtonType)type
                              frame:(CGRect)frame
                        buttonTitle:(NSString *)buttonTitle
                              color:(UIColor *)color
                        borderColor:(UIColor *)borderColor {
    
    OrderHalfButton *button = [OrderHalfButton buttonWithType:UIButtonTypeCustom];
    [button setFrame:frame];
    
    [button.titleLabel setFont:TextPingFangFontSize(14.0f)];
    [button setTitleColor:color forState:UIControlStateNormal];
    [button setTitle:buttonTitle forState:UIControlStateNormal];
    
    //[button setHalfCircleWithColor:borderColor];
    [button setCircleWithColor:borderColor borderWidth:1 cornerRadius:4];
    
    button.type = type;
    return button;
}
- (void)setOrderButtonStyleWithType:(OrderButtonType)type
                        buttonTitle:(NSString *)buttonTitle
                              color:(UIColor *)color
                        borderColor:(UIColor *)borderColor {
    [self.titleLabel setFont:TextPingFangFontSize(14.0f)];
    [self setTitleColor:color forState:UIControlStateNormal];
    [self setTitle:buttonTitle forState:UIControlStateNormal];
    
    //[self setHalfCircleWithColor:borderColor];
    [self setCircleWithColor:borderColor borderWidth:1 cornerRadius:4];
    
    self.type = type;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
